Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
cmake cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Aug 14, 2018
1 parent 139c72c commit 15e1c93
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions dir.source/CMakeLists.txt
@@ -1,15 +1,18 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.0)
project(transcar Fortran)

add_compile_options(-march=native -O3 -Wline-truncation -g -fbacktrace -fmax-errors=3)
add_compile_options(-O3)

# compiler dependent flags necessary for disk files used (sorry)
if(${CMAKE_Fortran_COMPILER_ID} MATCHES GNU)
add_compile_options(-frecord-marker=4 -std=legacy)# -Warray-bounds=2)
add_compile_options(-frecord-marker=4 -std=legacy
-march=native -Wline-truncation -g -fbacktrace -fmax-errors=3)# -Warray-bounds=2)
elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES Intel)
add_compile_options(-assume byterecl)
elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES PGI)
#already assumes byterecl
elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES Flang)
#already assumes byterecl
else()
message(WARNING "${CMAKE_Fortran_COMPILER_ID} unknown compiler type, disk options may be invalid")
endif()
Expand Down Expand Up @@ -66,12 +69,3 @@ target_link_libraries(transelec PRIVATE system fluid common)

add_library(imm ../dir.imm/IMM2.f90 ../dir.imm/IMM_routines.f90)

#---------------
enable_testing()

find_package(PythonInterp)
if(PYTHON_VERSION_STRING STRGREATER_EQUAL 3.6)
#if(PYTHONINTERP_FOUND)
add_test(NAME Python COMMAND pytest -v
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/..)
endif()

0 comments on commit 15e1c93

Please sign in to comment.