Skip to content

Commit

Permalink
changed structure
Browse files Browse the repository at this point in the history
  • Loading branch information
sfarrens committed Jun 23, 2020
1 parent ffdddb1 commit 8d644b6
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 29 deletions.
35 changes: 6 additions & 29 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,7 @@
cmake_minimum_required(VERSION 3.0)
project(BigMac)

# Enable OpenMP for Clang
set(OpenMP_INCLUDE_PATH "/usr/local/include")
set(OpenMP_LIB_PATH "/usr/local/lib")
set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -lomp")
set(OpenMP_CXX_LIB_NAMES "omp")
set(OpenMP_CXX_LIBRARIES "${OpenMP_LIB_PATH}/libomp.dylib")
include_directories(${OpenMP_INCLUDE_PATH})
link_directories(${OpenMP_LIB_PATH})
if(USE_FFTW)
set(FFTW_OMP_FLAGS "-lomp")
set(FFTW_CXX_FLAGS "-Xpreprocessor -fopenmp")
endif(USE_FFTW)

message(STATUS "OpenMP_CXX_FLAGS ${OpenMP_CXX_FLAGS}")

# Set CXX FLAGS
set(CMAKE_CXX_FLAGS "${OpenMP_CXX_FLAGS}")


set(CPP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
set(SOURCE_LIST hello_world)

foreach(program ${SOURCE_LIST})
add_executable(${program} ${CPP_SOURCE_DIR}/${program}.cpp)
endforeach(program)

INSTALL(TARGETS ${SOURCES} DESTINATION bin)
project(bigmac)
if(CMAKE_BUILD_TYPE STREQUAL "")
set(CMAKE_BUILD_TYPE "Release")
endif()
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
add_subdirectory(${CMAKE_SOURCE_DIR}/bigmac)
29 changes: 29 additions & 0 deletions bigmac/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
cmake_minimum_required(VERSION 3.0)
project(bigmac)

# Enable OpenMP for Clang
set(OpenMP_INCLUDE_PATH "/usr/local/include")
set(OpenMP_LIB_PATH "/usr/local/lib")
set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -lomp")
set(OpenMP_CXX_LIB_NAMES "omp")
set(OpenMP_CXX_LIBRARIES "${OpenMP_LIB_PATH}/libomp.dylib")
include_directories(${OpenMP_INCLUDE_PATH})
link_directories(${OpenMP_LIB_PATH})
if(USE_FFTW)
set(FFTW_OMP_FLAGS "-lomp")
set(FFTW_CXX_FLAGS "-Xpreprocessor -fopenmp")
endif(USE_FFTW)

message(STATUS "OpenMP_CXX_FLAGS ${OpenMP_CXX_FLAGS}")

# Set CXX FLAGS
set(CMAKE_CXX_FLAGS "${OpenMP_CXX_FLAGS}")

set(CPP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
set(SOURCE_LIST hello_world)

foreach(program ${SOURCE_LIST})
add_executable(${program} ${CPP_SOURCE_DIR}/${program}.cpp)
endforeach(program)

INSTALL(TARGETS ${SOURCE_LIST} DESTINATION bin)
Binary file added bigmac/hello_world
Binary file not shown.
File renamed without changes.
File renamed without changes.

0 comments on commit 8d644b6

Please sign in to comment.