diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CustomCommand/CMakeLists.txt | 11 | ||||
-rw-r--r-- | Tests/Wrapping/CMakeLists.txt | 7 | ||||
-rw-r--r-- | Tests/Wrapping/fakefluid.cxx | 16 |
3 files changed, 30 insertions, 4 deletions
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt index 69b6d2f..3f7a999 100644 --- a/Tests/CustomCommand/CMakeLists.txt +++ b/Tests/CustomCommand/CMakeLists.txt @@ -3,6 +3,8 @@ # PROJECT (CustomCommand) +ADD_SUBDIRECTORY(GeneratedHeader) + # # Lib and exe path # @@ -133,8 +135,10 @@ ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/foo.c # auto-object-depends feature of the Makefile generator. Currently # the feature does not seem to work in Visual Studio generators so # these dependencies are needed. -SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/foo.c PROPERTIES - OBJECT_DEPENDS "${PROJECT_BINARY_DIR}/doc1.h;${PROJECT_BINARY_DIR}/foo.h") +#SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/foo.c +#PROPERTIES +# OBJECT_DEPENDS "${PROJECT_BINARY_DIR}/doc1.h;${PROJECT_BINARY_DIR}/foo.h" +#) # add the library ADD_EXECUTABLE(CustomCommand @@ -143,6 +147,9 @@ ADD_EXECUTABLE(CustomCommand ${PROJECT_BINARY_DIR}/generated.c ) +TARGET_LINK_LIBRARIES(CustomCommand GeneratedHeader) + # must add a dependency on TDocument otherwise it might never build and # the CustomCommand executable really needs doc1.h ADD_DEPENDENCIES(CustomCommand TDocument) + diff --git a/Tests/Wrapping/CMakeLists.txt b/Tests/Wrapping/CMakeLists.txt index d8b332d..3b7684a 100644 --- a/Tests/Wrapping/CMakeLists.txt +++ b/Tests/Wrapping/CMakeLists.txt @@ -143,15 +143,18 @@ ENDIF (QT_FOUND AND QT_UIC_EXECUTABLE) SET (FLTK_SRCS fltk1.fl ) +ADD_EXECUTABLE(fakefluid fakefluid.cxx) +GET_TARGET_PROPERTY(FLUID_LOC fakefluid LOCATION) SET (FLTK_WRAP_UI "On") -SET (FLTK_FLUID_EXECUTABLE "echo") +SET (FLTK_FLUID_EXECUTABLE "${FLUID_LOC}") FLTK_WRAP_UI (wraplibFLTK ${FLTK_SRCS}) ADD_LIBRARY(wraplibFLTK ${wraplibFLTK_FLTK_UI_SRCS}) CONFIGURE_FILE( ${Wrapping_SOURCE_DIR}/fltk1.fl ${Wrapping_BINARY_DIR}/fltk1.cxx COPYONLY) - +ADD_DEPENDENCIES(wraplibFLTK fakefluid) +ADD_DEPENDENCIES(fakefluid Wrap) # # Mangled Mesa # diff --git a/Tests/Wrapping/fakefluid.cxx b/Tests/Wrapping/fakefluid.cxx new file mode 100644 index 0000000..25c6e93 --- /dev/null +++ b/Tests/Wrapping/fakefluid.cxx @@ -0,0 +1,16 @@ +#include <stdio.h> +#include <string.h> +int main(int ac, char** av) +{ + for(int i =0; i < ac; ++i) + { + if(strcmp(av[i], "-o") == 0) + { + FILE* file = fopen(av[i+1], "w"); + fprintf(file, "// hello\n"); + fclose(file); + return 0; + } + } + return 0; +} |