Skip to content

Commit

Permalink
Building example using CMake issue:
Browse files Browse the repository at this point in the history
- wrong output files path generation (.cpp) was fixed;
- file extensions pattern was extended.
  • Loading branch information
Gluttton authored and Oliviers-OSS committed Aug 5, 2015
1 parent cf5a721 commit 82ae605
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build_tools/cmake/CxxTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
include("${CMAKE_CURRENT_LIST_DIR}/FindCxxTest.cmake")

function(cxx_test target source)
string(REGEX REPLACE "hpp$" "cpp" CPP_FILE_NAME ${source})
get_filename_component(CPP_FILE_NAME ${source} NAME)
string(REGEX REPLACE "h$|hpp$" "cpp" CPP_FILE_NAME ${CPP_FILE_NAME})
message(${CPP_FILE_NAME})
set(CPP_FULL_NAME "${CMAKE_CURRENT_BINARY_DIR}/${CPP_FILE_NAME}")
add_custom_command(
Expand Down

0 comments on commit 82ae605

Please sign in to comment.