Skip to content

Commit

Permalink
Merge branch 'features/language-decouple' into bleeding
Browse files Browse the repository at this point in the history
  • Loading branch information
Snaipe committed Dec 8, 2015
2 parents df7d47f + ac2f5e1 commit 78a6246
Showing 18 changed files with 135 additions and 634 deletions.
19 changes: 0 additions & 19 deletions .cmake/Modules/CMakeDetermineObjectiveCCompiler.cmake

This file was deleted.

10 changes: 0 additions & 10 deletions .cmake/Modules/CMakeObjectiveCCompiler.cmake.in

This file was deleted.

192 changes: 0 additions & 192 deletions .cmake/Modules/CMakeObjectiveCInformation.cmake

This file was deleted.

64 changes: 0 additions & 64 deletions .cmake/Modules/CMakeTestObjectiveCCompiler.cmake

This file was deleted.

17 changes: 0 additions & 17 deletions .cmake/Modules/Languages.cmake

This file was deleted.

30 changes: 6 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -43,12 +43,13 @@ if (MSVC)
include_directories(dependencies/wingetopt/src/)
endif ()

# Language support

include(Languages)

# Check for C++11

option(LANG_CXX "Turn on C++ support" ON)
if (LANG_CXX)
enable_language(CXX)
endif ()

if (NOT MSVC AND CMAKE_CXX_COMPILER_WORKS)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
@@ -133,9 +134,6 @@ find_package(PCRE)
# List sources and headers

set(SOURCE_FILES
src/core/wrappers/wrap.h
src/core/wrappers/wrap.c
src/core/wrappers/wrappers.c
src/core/abort.c
src/core/abort.h
src/core/report.c
@@ -150,6 +148,7 @@ set(SOURCE_FILES
src/core/stats.c
src/core/stats.h
src/core/ordered-set.c
src/core/test.c
src/compat/internal.h
src/compat/pipe.c
src/compat/pipe.h
@@ -203,23 +202,6 @@ if (PCRE_FOUND)
set(HAVE_PCRE 1)
endif ()

if (CMAKE_CXX_COMPILER_WORKS)
set(SOURCE_FILES ${SOURCE_FILES} src/core/wrappers/wrap.cc)
endif ()

if (CMAKE_ObjectiveC_COMPILER_WORKS)
set(CMAKE_ObjectiveC_FLAGS "${CMAKE_ObjectiveC_FLAGS} ${CMAKE_C_FLAGS} -fobjc-exceptions")
if ("${CMAKE_ObjectiveC_COMPILER_ID}" STREQUAL "Clang" AND APPLE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -framework Foundation")
endif ()
add_definitions(-D_NATIVE_OBJC_EXCEPTIONS)

if (NOT WIN32)
set(CMAKE_ObjectiveC_FLAGS "${CMAKE_ObjectiveC_FLAGS} -fPIC")
endif ()
set(SOURCE_FILES ${SOURCE_FILES} src/core/wrappers/wrap.m)
endif ()

set(INTERFACE_FILES
include/criterion/assert.h
include/criterion/abort.h
2 changes: 2 additions & 0 deletions include/criterion/abort.h
Original file line number Diff line number Diff line change
@@ -42,6 +42,8 @@ CR_API CR_NORETURN void criterion_abort_test(void);
*/
CR_INLINE static void criterion_continue_test(void) {}

CR_API void criterion_test_die(const char *msg, ...);

CR_END_C_API

#endif /* !CRITERION_ABORT_H_ */
3 changes: 3 additions & 0 deletions include/criterion/criterion.h
Original file line number Diff line number Diff line change
@@ -113,6 +113,9 @@ CR_API int criterion_handle_args(int argc, char *argv[], bool handle_unknown_arg
CR_API void criterion_register_test(struct criterion_test_set *tests,
struct criterion_test *test);

extern const struct criterion_test *const criterion_current_test;
extern const struct criterion_suite *const criterion_current_suite;

CR_END_C_API

#endif /* !CRITERION_H_ */
Loading

0 comments on commit 78a6246

Please sign in to comment.