diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/VSResource/CMakeLists.txt | 7 | ||||
-rw-r--r-- | Tests/VSResource/main.cpp | 10 | ||||
-rw-r--r-- | Tests/VSResource/test.rc | 5 | ||||
-rw-r--r-- | Tests/VSResource/test.txt | 1 |
5 files changed, 26 insertions, 1 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 289e632..911b247 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -131,6 +131,9 @@ IF(BUILD_TESTING) ADD_TEST_MACRO(TarTest TarTest) ADD_TEST_MACRO(SystemInformation SystemInformation) ADD_TEST_MACRO(MathTest MathTest) + IF(MSVC) + ADD_TEST_MACRO(VSResource VSResource) + ENDIF() ADD_TEST_MACRO(Simple Simple) ADD_TEST_MACRO(PreOrder PreOrder) ADD_TEST_MACRO(MissingSourceFile MissingSourceFile) @@ -246,7 +249,6 @@ IF(BUILD_TESTING) --test-command Simple) LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Simple_CodeBlocksGenerator") ENDIF ("${cmakeOutput}" MATCHES CodeBlocks) - # check for the KDevelop3 generator IF ("${cmakeOutput}" MATCHES KDevelop3) ADD_TEST(Simple_KDevelop3Generator ${CMAKE_CTEST_COMMAND} diff --git a/Tests/VSResource/CMakeLists.txt b/Tests/VSResource/CMakeLists.txt new file mode 100644 index 0000000..e842955 --- /dev/null +++ b/Tests/VSResource/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required (VERSION 2.6) +project (VSResource) +add_definitions(/DCMAKE_RCDEFINE="test.txt") +string(REPLACE "/INCREMENTAL:YES" "" + CMAKE_EXE_LINKER_FLAGS_DEBUG + "${CMAKE_EXE_LINKER_FLAGS_DEBUG}") +add_executable(VSResource main.cpp test.rc) diff --git a/Tests/VSResource/main.cpp b/Tests/VSResource/main.cpp new file mode 100644 index 0000000..6f68df3 --- /dev/null +++ b/Tests/VSResource/main.cpp @@ -0,0 +1,10 @@ +#include <windows.h> + +int main(int argc, char** argv) { + HRSRC hello = ::FindResource(0, "hello", "TEXT"); + if(hello) { + return 0; + } else { + return 1; + } +} diff --git a/Tests/VSResource/test.rc b/Tests/VSResource/test.rc new file mode 100644 index 0000000..8aab8b7 --- /dev/null +++ b/Tests/VSResource/test.rc @@ -0,0 +1,5 @@ +#ifdef CMAKE_RCDEFINE +hello TEXT DISCARDABLE CMAKE_RCDEFINE +#else +#error "resource compiler did not get defines from command line!" +#endif
\ No newline at end of file diff --git a/Tests/VSResource/test.txt b/Tests/VSResource/test.txt new file mode 100644 index 0000000..980a0d5 --- /dev/null +++ b/Tests/VSResource/test.txt @@ -0,0 +1 @@ +Hello World! |