Skip to content

Commit

Permalink
add more to cmakelist.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
jcurtis2 committed Aug 26, 2024
1 parent 89062f6 commit b92064e
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ cmake_minimum_required(VERSION 2.6.4)
# http://www.cmake.org/Bug/view.php?id=8598
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35707
# http://www.cmake.org/Bug/view.php?id=8408
if (ENABLE_TCHEM_GPU)
# Use the wrapper to nvcc for the CXX compiler
set(ENV{CXX} $ENV{KOKKOS_PATH}/bin/nvcc_wrapper)
set(CMAKE_CXX_FLAGS "-lpthread -ldl -fopenmp" CACHE STRING "" FORCE)
if (ENABLE_TCHEM)
set(CMAKE_C_FLAGS "-lpthread -ldl -fopenmp" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS "-lpthread -ldl -fopenmp" CACHE STRING "" FORCE)
project(PARTMC Fortran C CXX)
# Use the wrapper to nvcc for the CXX compiler
if (ENABLE_TCHEM_GPU)
set(ENV{CXX} $ENV{KOKKOS_PATH}/bin/nvcc_wrapper)
set(CMAKE_CXX_FLAGS "-lpthread -ldl -fopenmp" CACHE STRING "" FORCE)
project(PARTMC Fortran C CXX)
else()
project(PARTMC Fortran C)
endif()
else()
project(PARTMC Fortran C)
endif()
Expand Down Expand Up @@ -260,7 +264,9 @@ endif()
add_executable(partmc src/partmc.F90)

target_link_libraries(partmc partmclib)
set_property(TARGET partmc PROPERTY LINKER_LANGUAGE CXX)
if (ENABLE_TCHEM_GPU)
set_property(TARGET partmc PROPERTY LINKER_LANGUAGE CXX)
endif()

######################################################################
# test_bidisperse_ode
Expand Down

0 comments on commit b92064e

Please sign in to comment.