Skip to content

Commit 4b0e2d4

Browse files
committed
Create goto-gcc symlink in cmake builds and enable goto-gcc tests
Fixes: #1500
1 parent 6016bef commit 4b0e2d4

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

regression/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ add_subdirectory(goto-cc-goto-analyzer)
3434
add_subdirectory(goto-diff)
3535
add_subdirectory(goto-instrument)
3636
add_subdirectory(goto-instrument-typedef)
37+
if(NOT WIN32)
38+
add_subdirectory(goto-gcc)
39+
endif()
3740
add_subdirectory(invariants)
3841
add_subdirectory(jbmc-strings)
3942
add_subdirectory(strings)

regression/goto-gcc/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# TARGET_FILE (as used in other directories) can't be used with goto-gcc as it
2+
# isn't marked as an executable (target), which CMake requires. Thus construct a
3+
# path in the same way the symbolic link is created in the goto-cc directory.
4+
add_test_pl_tests("$<TARGET_FILE_DIR:goto-cc>/goto-gcc")

src/goto-cc/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,9 @@ target_link_libraries(goto-cc goto-cc-lib)
2929

3030
if(WIN32)
3131
set_target_properties(goto-cc PROPERTIES OUTPUT_NAME goto-cl)
32+
else()
33+
add_custom_command(TARGET goto-cc
34+
POST_BUILD
35+
COMMAND "${CMAKE_COMMAND}" -E create_symlink
36+
goto-cc $<TARGET_FILE_DIR:goto-cc>/goto-gcc)
3237
endif()

0 commit comments

Comments
 (0)