Skip to content

Commit 34f7fa2

Browse files
rp42bluca
authored andcommitted
cmake_minimum_required() before project()
* Without this CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded (MT) Windows builds still produced incompatible MultiThreadedDLL (MD) output. * Resolves following warning: CMake Warning (dev) at CMakeLists.txt:2 (project): cmake_minimum_required() should be called prior to this top-level project() call. * Use ${CMAKE_HOST_SYSTEM_NAME} as ${CMAKE_SYSTEM_NAME} not set before project().
1 parent a23330d commit 34f7fa2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# CMake build script for ZeroMQ
2-
project(ZeroMQ)
32

4-
if(${CMAKE_SYSTEM_NAME} STREQUAL Darwin)
3+
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL Darwin)
54
cmake_minimum_required(VERSION 3.0.2)
65
else()
76
cmake_minimum_required(VERSION 2.8.12)
87
endif()
98

9+
project(ZeroMQ)
10+
1011
include(CheckIncludeFiles)
1112
include(CheckCCompilerFlag)
1213
include(CheckCXXCompilerFlag)

0 commit comments

Comments
 (0)