Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
56bb3df1
Commit
56bb3df1
authored
Oct 12, 2012
by
Steve-o
Committed by
Steven McCoy
Oct 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect ZeroMQ version at build time; hide NSIS dependencies in new cmake folder.
parent
b42e45ad
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
6 deletions
+61
-6
CMakeLists.txt
CMakeLists.txt
+3
-6
TestZMQVersion.cmake
cmake/Modules/TestZMQVersion.cmake
+27
-0
zmq_version.cpp
cmake/Modules/zmq_version.cpp
+31
-0
NSIS.template32.in
cmake/NSIS.template32.in
+0
-0
NSIS.template64.in
cmake/NSIS.template64.in
+0
-0
No files found.
CMakeLists.txt
View file @
56bb3df1
...
...
@@ -4,10 +4,7 @@ cmake_minimum_required (VERSION 2.8)
project
(
ZeroMQ
)
# TODO: Extract from include/zmq.h
set
(
ZMQ_VERSION_MAJOR
"3"
)
set
(
ZMQ_VERSION_MINOR
"2"
)
set
(
ZMQ_VERSION_PATCH
"0"
)
include
(
${
CMAKE_SOURCE_DIR
}
/cmake/Modules/TestZMQVersion.cmake
)
# WARNING: Windows Python will override Cygwin yet not work with Asciidoc.
#find_package (PythonInterp REQUIRED)
...
...
@@ -198,9 +195,9 @@ add_custom_command(
list
(
APPEND sources
${
CMAKE_BINARY_DIR
}
/platform.hpp
)
if
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
set
(
nsis-template
${
CMAKE_SOURCE_DIR
}
/NSIS.template64.in
)
set
(
nsis-template
${
CMAKE_SOURCE_DIR
}
/
cmake/
NSIS.template64.in
)
else
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
set
(
nsis-template
${
CMAKE_SOURCE_DIR
}
/NSIS.template32.in
)
set
(
nsis-template
${
CMAKE_SOURCE_DIR
}
/
cmake/
NSIS.template32.in
)
endif
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
add_custom_command
(
OUTPUT
${
CMAKE_BINARY_DIR
}
/NSIS.template.in
...
...
cmake/Modules/TestZMQVersion.cmake
0 → 100644
View file @
56bb3df1
MESSAGE
(
STATUS
"Detecting ZMQ"
)
SET
(
TRY_RUN_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
CMAKE_FILES_DIRECTORY
}
/zmq_run.dir
)
TRY_RUN
(
RUN_RESULT COMPILE_RESULT
${
TRY_RUN_DIR
}
${
CMAKE_SOURCE_DIR
}
/cmake/Modules/zmq_version.cpp
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES:STRING=
${
CMAKE_SOURCE_DIR
}
/include"
COMPILE_OUTPUT_VARIABLE COMPILE_OUTPUT
RUN_OUTPUT_VARIABLE RUN_OUTPUT
)
IF
(
COMPILE_RESULT
)
IF
(
RUN_RESULT MATCHES
"FAILED_TO_RUN"
)
MESSAGE
(
STATUS
"Detecting ZMQ - failed"
)
ELSE
()
STRING
(
REGEX REPLACE
"([0-9]+)
\\
.([0-9]+)
\\
.([0-9]+).*"
"
\\
1"
ZMQ_VERSION_MAJOR
"
${
RUN_OUTPUT
}
"
)
STRING
(
REGEX REPLACE
"([0-9]+)
\\
.([0-9]+)
\\
.([0-9]+).*"
"
\\
2"
ZMQ_VERSION_MINOR
"
${
RUN_OUTPUT
}
"
)
STRING
(
REGEX REPLACE
"([0-9]+)
\\
.([0-9]+)
\\
.([0-9]+).*"
"
\\
3"
ZMQ_VERSION_PATCH
"
${
RUN_OUTPUT
}
"
)
MESSAGE
(
STATUS
"Detecting ZMQ -
${
ZMQ_VERSION_MAJOR
}
.
${
ZMQ_VERSION_MINOR
}
.
${
ZMQ_VERSION_PATCH
}
"
)
ENDIF
()
ELSE
()
MESSAGE
(
STATUS
"Check for ZMQ version - not found"
)
MESSAGE
(
STATUS
"Detecting ZMQ - failed"
)
ENDIF
()
cmake/Modules/zmq_version.cpp
0 → 100644
View file @
56bb3df1
/*
Copyright (c) 2007-2012 iMatix Corporation
Copyright (c) 2009-2011 250bpm s.r.o.
Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
This file is part of 0MQ.
0MQ is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
0MQ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "zmq.h"
#include <stdio.h>
int
main
()
{
printf
(
"%d.%d.%d
\n
"
,
ZMQ_VERSION_MAJOR
,
ZMQ_VERSION_MINOR
,
ZMQ_VERSION_PATCH
);
return
0
;
}
NSIS.template32.in
→
cmake/
NSIS.template32.in
View file @
56bb3df1
File moved
NSIS.template64.in
→
cmake/
NSIS.template64.in
View file @
56bb3df1
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment