Skip to content

Commit 3a56ebf

Browse files
author
Kent Knox
committed
Everything compiles on MacOSX with the Unix makefile generator
1 parent 60dfdea commit 3a56ebf

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ get_filename_component( C_COMPILER_NAME ${CMAKE_C_COMPILER} NAME_WE )
180180
# message( "CMAKE_C_COMPILER: " ${CMAKE_C_COMPILER} )
181181

182182
# Set common compile and link options
183-
if( C_COMPILER_NAME STREQUAL "cl" )
183+
if( MSVC )
184184
# Following options for nMake
185185
message( STATUS "Detected MSVS Ver: " ${MSVC_VERSION} )
186186

@@ -210,8 +210,6 @@ elseif( CMAKE_COMPILER_IS_GNUCXX )
210210
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
211211
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage")
212212
endif()
213-
# elseif( APPLE )
214-
# set( CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ ${CMAKE_CXX_FLAGS}" )
215213
endif( )
216214

217215
# If UNICODE is defined for microsoft compilers, pass extra definitions

src/client/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ set( Client.Files ${Client.Source} ${Client.Headers} )
3333
set( DL_LIB "" )
3434
if( WIN32 )
3535
add_definitions( "/D_CONSOLE" )
36-
else()
36+
elseif( APPLE )
37+
set( CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ ${CMAKE_CXX_FLAGS}" )
38+
else( )
3739
# To use the dlopen() and dlclose() functions, we should link with libdl
3840
set( DL_LIB "-ldl" )
39-
endif()
41+
endif( )
4042

4143
# Include standard OpenCL headers
4244
include_directories( ${Boost_INCLUDE_DIRS} ${OPENCL_INCLUDE_DIRS} ../../../common ${PROJECT_BINARY_DIR}/include ../include )

src/tests/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ elseif( CMAKE_COMPILER_IS_GNUCXX )
5959
set( LD_PTHREAD "-lpthread" )
6060
elseif( APPLE )
6161
set( CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ ${CMAKE_CXX_FLAGS}" )
62-
# set( CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}" )
6362
add_definitions( -DGTEST_USE_OWN_TR1_TUPLE )
6463
endif( )
6564

0 commit comments

Comments
 (0)