Skip to content

Commit

Permalink
fix(CMakeLists): memperbaiki typo modules
Browse files Browse the repository at this point in the history
Signed-off-by: slowy07 <[email protected]>
  • Loading branch information
slowy07 committed Oct 8, 2024
1 parent 613a3cb commit a3acc91
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ function(source_fortran DIR SOURCES)
endfunction()

set(MODULE_SOURCES)
source_fortran(${CMAKE_SOURCE_DIR}/modules MODULE_SOURCES)
add_library(modules STATIC ${MODULE_SOURCES})
source_fortran(${CMAKE_SOURCE_DIR}/module MODULE_SOURCES)
add_library(module STATIC ${MODULE_SOURCES})

function(buat_nama_file_unik FILE_NAME OUTPUT_NAME)
file(RELATIVE_PATH REL_PATH "${CMAKE_SOURCE_DIR}" "${FILE_NAME}")
Expand All @@ -36,7 +36,7 @@ file(GLOB_RECURSE TEST_FILES "${CMAKE_SOURCE_DIR}/test/*.f90")
foreach(TEST_FILE ${TEST_FILES})
buat_nama_file_unik(${TEST_FILE} TEST_NAME)
add_executable(${TEST_NAME} ${TEST_FILE})
target_link_libraries(${TEST_NAME} modules)
target_link_libraries(${TEST_NAME} module)
add_test(NAME ${TEST_NAME} COMMAND ${TEST_NAME})
endforeach()

Expand All @@ -45,7 +45,7 @@ file(GLOB_RECURSE EXAMPLE_FILES "${CMAKE_SOURCE_DIR}/contoh/*.f90")
foreach(EXAMPLE_FILE ${EXAMPLE_FILES})
buat_nama_file_unik(${EXAMPLE_FILE} EXAMPLE_NAME)
add_executable(${EXAMPLE_NAME} ${EXAMPLE_FILE})
target_link_libraries(${EXAMPLE_NAME} modules)
target_link_libraries(${EXAMPLE_NAME} module)
list(APPEND EXAMPLE_NAME_LIST run_${EXAMPLE_NAME})
add_custom_target(run_${EXAMPLE_NAME}
COMMAND ${EXAMPLE_NAME}
Expand Down

0 comments on commit a3acc91

Please sign in to comment.