-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists3.txt
68 lines (47 loc) · 1.99 KB
/
CMakeLists3.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
project(fluidSim)
cmake_minimum_required(VERSION 2.8)
message("system: ${CMAKE_SYSTEM_PREFIX_PATH}")
#set(CMAKE_C_COMPILER "/usr/local/bin/gcc")
#set(CMAKE_CXX_COMPILER "/usr/local/bin/g++")
set(LIBRARY_SEARCH_PATH
/usr/local
/usr/local/include
/opt/local
/usr
/opt
/Library/Frameworks
/Users/delliott/code/openmp/runtime/exports/mac_32e/lib
)
set(HEADER_SEARCH_PATH
/usr/local
/opt/local
/usr
/opt
)
#find_library(IOMP5_LIBRARY iomp5 ${LIBRARY_SEARCH_PATH})
#MESSAGE(STATUS "Found iomp5 in: ${IOMP5_LIBRARY}")
find_library(GLEWLIB glew ${LIBRARY_SEARCH_PATH})
MESSAGE(STATUS "Found glew in: ${GLEWLIB}")
find_library(IOMP5_LIBRARIES iomp5 ${LIBRARY_SEARCH_PATH})
MESSAGE(STATUS "Found iomp5 in: ${IOMP5_LIBRARIES}")
find_library(SDL2LIB sdl2 ${LIBRARY_SEARCH_PATH})
MESSAGE(STATUS "Found sdl2 in: ${SDL2LIB}")
set(CMAKE_C_COMPILER /Users/delliott/code/llvm/build/Release/bin/clang2)
set(CMAKE_CXX_COMPILER /Users/delliott/code/llvm/build/Release/bin/clang2++)
include_directories(/Users/delliott/code/llvm/projects/libcxx/include)
include_directories(/Users/delliott/code/openmp/runtime/build)
include_directories(${HEADER_SEARCH_PATH})
#-lstdc++ -stdlib=libc++
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp -std=c++1y -pedantic -mfpmath=sse -msse2 -msse3 -msse4 -msse4.1 -msse4.2 -O3")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp=libiomp5 -std=c++1y -O3")
aux_source_directory(src/ SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})
find_package(OpenGL)
link_directories(/usr/local/lib/)
#link_directories(/Users/delliott/code/openmp/runtime/exports/mac_32e/lib)
#set(CMAKE_EXE_LINKER_FLAGS "-framework iomp5")
#find_library(iomp5 NAMES libiomp5.dylib PATHS /Users/delliott/code/openmp/runtime/exports/build/)
#MESSAGE(STATUS "Found iomp5 in: ${iomp5}")
#link_directories(/Users/delliott/code/libcxx/build/lib)
#target_link_libraries(${PROJECT_NAME} SDL2 GLEW ${OPENGL_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${GLEWLIB} ${SDL2LIB} ${IOMP5_LIBRARIES} ${OPENGL_LIBRARIES})