Skip to content

Commit 24ce704

Browse files
author
Kent Knox
committed
Everything builds with xcode 5.0 except for the googletest executable
1 parent 0def5e1 commit 24ce704

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ 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-
else( )
214-
message( FATAL_ERROR "Compiler not supported or not detected" )
213+
# elseif( APPLE )
214+
# set( CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ ${CMAKE_CXX_FLAGS}" )
215215
endif( )
216216

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

src/statTimer/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ set_target_properties( StatTimer PROPERTIES SOVERSION ${CLFFT_SOVERSION} )
6969
set_target_properties( StatTimer PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" )
7070
target_link_libraries( StatTimer ${OPENCL_LIBRARIES} )
7171

72-
if( UNIX )
72+
if( UNIX AND NOT APPLE )
7373
# This library dependency is brought in by the high precision timer available in linux
7474
target_link_libraries( StatTimer -lrt )
7575
endif( )

src/tests/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ if( MINGW )
5757
elseif( CMAKE_COMPILER_IS_GNUCXX )
5858
set( CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}" )
5959
set( LD_PTHREAD "-lpthread" )
60+
elseif( APPLE )
61+
set( CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ ${CMAKE_CXX_FLAGS}" )
62+
# set( CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}" )
63+
add_definitions( -DGTEST_USE_OWN_TR1_TUPLE )
6064
endif( )
6165

6266
# Include standard OpenCL headers

0 commit comments

Comments
 (0)