Commit b43694e4 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[FIX #94] - added Cmake fix by anonymous reporter to make OW build on Mac again.

parent 84c8dc21
...@@ -36,14 +36,17 @@ IF( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR} ) ...@@ -36,14 +36,17 @@ IF( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR} )
MESSAGE( FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there. (you may need to remove CMakeCache.txt" ) MESSAGE( FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there. (you may need to remove CMakeCache.txt" )
ENDIF() ENDIF()
# where to find our utils and cmake modules?
SET( OW_TOOLS_DIR ${PROJECT_SOURCE_DIR}/../tools )
# append search path for FindModules: # append search path for FindModules:
LIST( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../tools/cmake ) LIST( APPEND CMAKE_MODULE_PATH ${OW_TOOLS_DIR}/cmake )
# here, we have certain utilities. For example ASSERT_GE_VERSION which ensures a specific minimum version # here, we have certain utilities. For example ASSERT_GE_VERSION which ensures a specific minimum version
INCLUDE( ${CMAKE_MODULE_PATH}/Utils.cmake ) INCLUDE( Utils )
# These scripts contains all the needed tools to setup the build # These scripts contains all the needed tools to setup the build
INCLUDE( ${CMAKE_MODULE_PATH}/BuildUtils.cmake ) INCLUDE( BuildUtils )
INCLUDE( ${CMAKE_MODULE_PATH}/BuildModuleUtils.cmake ) INCLUDE( BuildModuleUtils )
# CMAKE automatism to select static vs. shared building: # CMAKE automatism to select static vs. shared building:
IF( NOT CMAKE_GENERATOR MATCHES "Visual Studio" ) IF( NOT CMAKE_GENERATOR MATCHES "Visual Studio" )
...@@ -319,7 +322,7 @@ ENDIF() ...@@ -319,7 +322,7 @@ ENDIF()
# TODO(ebaum): use try_run for this # TODO(ebaum): use try_run for this
# Determines the number of cores available on this machine # Determines the number of cores available on this machine
IF( NOT CMAKE_GENERATOR MATCHES "Visual Studio" ) IF( NOT CMAKE_GENERATOR MATCHES "Visual Studio" )
SET( NUM_CORES_SOURCE_DIR ${CMAKE_MODULE_PATH}/numCores ) SET( NUM_CORES_SOURCE_DIR ${OW_TOOLS_DIR}/cmake/numCores )
SET( NUM_CORES_BINARY_DIR ${PROJECT_BINARY_DIR}/numCores ) SET( NUM_CORES_BINARY_DIR ${PROJECT_BINARY_DIR}/numCores )
SET( NUM_CORES_BINARY ${NUM_CORES_BINARY_DIR}/numCores ) SET( NUM_CORES_BINARY ${NUM_CORES_BINARY_DIR}/numCores )
ADD_CUSTOM_TARGET( numCores ADD_CUSTOM_TARGET( numCores
...@@ -513,5 +516,5 @@ MARK_AS_ADVANCED( FORCE OPENTHREADS_LIBRARY_DEBUG ) ...@@ -513,5 +516,5 @@ MARK_AS_ADVANCED( FORCE OPENTHREADS_LIBRARY_DEBUG )
# --------------------------------------------------------------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------------------------------------------------------------
# for package setup: # for package setup:
INCLUDE( ${CMAKE_MODULE_PATH}/Packaging.cmake ) INCLUDE( Packaging )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment