<commit_before>﻿########################################################################
# CMake build script for iutest.
#

# CMake バージョン
cmake_minimum_required(VERSION 3.0.2)

# option
option(build_gtest_samples "gtest sample build." OFF)
option(build_tests "tests build." ON)

# Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build().
include(cmake/hermetic_build.cmake OPTIONAL)

if (COMMAND pre_project_set_up_hermetic_build)
  pre_project_set_up_hermetic_build()
endif()

########################################################################
#
# Project-wide settings

# プロジェクト名
project(iutest CXX C)

find_path(IUTEST_ROOT_DIR
        NAMES include/iutest.hpp
        HINTS 
            ../../
        )

set(CMAKE_MODULE_PATH ${IUTEST_ROOT_DIR}/cmake)
find_package(IUTEST REQUIRED)


if (COMMAND set_up_hermetic_build)
  set_up_hermetic_build()
endif()

# include
include(internal_utils.cmake)
config_compiler_and_linker()  # Defined in internal_utils.cmake.

# インクルードパス
include_directories(${IUTEST_INCLUDE_DIR})

########################################################################
#
# ライブラリ
#
cxx_library(iutest "${cxx_strict}" ${IUTEST_ROOT_DIR}/src/iutest_all.cpp)
cxx_library(iutest_main "${cxx_strict}" ${IUTEST_ROOT_DIR}/src/iutest_main.cpp)

########################################################################
#
# サンプル
#
cxx_executable_sample(iutest_sample
 ${IUTEST_ROOT_DIR}/samples/main.cpp
 ${IUTEST_ROOT_DIR}/samples/assertion.cpp
 ${IUTEST_ROOT_DIR}/samples/disabledtest.cpp
 ${IUTEST_ROOT_DIR}/samples/exception.cpp
 ${IUTEST_ROOT_DIR}/samples/fixture.cpp
 ${IUTEST_ROOT_DIR}/samples/japanese.cpp
 ${IUTEST_ROOT_DIR}/samples/matcher.cpp
 ${IUTEST_ROOT_DIR}/samples/parameterized.cpp
 ${IUTEST_ROOT_DIR}/samples/printto.cpp
 ${IUTEST_ROOT_DIR}/samples/simple.cpp
 ${IUTEST_ROOT_DIR}/samples/typed.cpp
)

########################################################################
#
# gtest サンプル
#
if (build_gtest_samples)
  cxx_executable_gtest_sample(sample1_unittest  ${IUTEST_ROOT_DIR}/samples/gtest sample1.cc main.cc)
  cxx_executable_gtest_sample(sample2_unittest  ${IUTEST_ROOT_DIR}/samples/gtest sample2.cc main.cc)
  cxx_executable_gtest_sample(sample3_unittest  ${IUTEST_ROOT_DIR}/samples/gtest main.cc)
  cxx_executable_gtest_sample(sample4_unittest  ${IUTEST_ROOT_DIR}/samples/gtest sample4.cc main.cc)
  cxx_executable_gtest_sample(sample5_unittest  ${IUTEST_ROOT_DIR}/samples/gtest sample1.cc main.cc)
  cxx_executable_gtest_sample(sample6_unittest  ${IUTEST_ROOT_DIR}/samples/gtest main.cc)
  cxx_executable_gtest_sample(sample7_unittest  ${IUTEST_ROOT_DIR}/samples/gtest main.cc)
  cxx_executable_gtest_sample(sample8_unittest  ${IUTEST_ROOT_DIR}/samples/gtest main.cc)
  cxx_executable_gtest_sample(sample9_unittest  ${IUTEST_ROOT_DIR}/samples/gtest )
  cxx_executable_gtest_sample(sample10_unittest ${IUTEST_ROOT_DIR}/samples/gtest )
endif()

########################################################################
#
# test
#
if (build_tests)
  cxx_executable_test_with_main(all_tests
   assertion_tests.cpp
   basic_tests.cpp
   combine_tests.cpp
   compatibility_tests.cpp
   filepath_tests.cpp
   fixture_tests.cpp
   floatingpoint_tests.cpp
   no_failure_tests.cpp
   nullptr_tests.cpp
   param_test_tests1.cpp
   param_test_tests2.cpp
   pred_tests.cpp
   prod_tests1.cpp
   prod_tests2.cpp
   spi_tests.cpp
   static_assertion_tests.cpp
   string_assertion_tests.cpp
   syntax_tests.cpp
   syntax_gtest_tests.cpp
   type_param_tests1.cpp
   type_param_tests2.cpp
   type_param_tests3.cpp
   typed_test_tests.cpp
   values_tests.cpp
  )
  cxx_executable_test(assertion_return_tests)
  cxx_executable_test(assume_tests)
  cxx_executable_test(break_on_failure_nobreak_tests)
  cxx_executable_test(catch_exceptions_tests)
  cxx_executable_test(commandline_tests)
  cxx_executable_test(csvparams_tests)
  cxx_executable_test(cxx_feature_tests)
  cxx_executable_test(disabled_tests)
  cxx_executable_test(env_var_gtest_tests)
  cxx_executable_test(environment_tests)
  cxx_executable_test(exception_assertion_tests)
  cxx_executable_test(exception_tests)
  cxx_executable_test(expression_assertion_tests)
  cxx_executable_test_with_main(extension_tests
    concat_tests.cpp
    fixture_alias_tests.cpp
    ignore_tests.cpp
    package_tests1.cpp
    package_tests2.cpp
    pairwise_tests.cpp
    param_method_tests.cpp
    param_test_with_any_tests.cpp
    pp_tests.cpp
    random_values_tests.cpp<commit_msg>revert local change<commit_after>﻿########################################################################
# CMake build script for iutest.
#

# CMake バージョン
cmake_minimum_required(VERSION 3.0.2)

# option
option(build_gtest_samples "gtest sample build." OFF)
option(build_tests "tests build." ON)

# Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build().
include(cmake/hermetic_build.cmake OPTIONAL)

if (COMMAND pre_project_set_up_hermetic_build)
  pre_project_set_up_hermetic_build()
endif()

########################################################################
#
# Project-wide settings

# プロジェクト名
project(iutest CXX C)

find_path(IUTEST_ROOT_DIR
        NAMES include/iutest.hpp
        HINTS 
            ../../
        )

set(CMAKE_MODULE_PATH ${IUTEST_ROOT_DIR}/cmake)
find_package(IUTEST REQUIRED)


if (COMMAND set_up_hermetic_build)
  set_up_hermetic_build()
endif()

# include
include(internal_utils.cmake)
config_compiler_and_linker()  # Defined in internal_utils.cmake.

# インクルードパス
include_directories(${IUTEST_INCLUDE_DIR})

########################################################################
#
# ライブラリ
#
cxx_library(iutest "${cxx_strict}" ${IUTEST_ROOT_DIR}/src/iutest_all.cpp)
cxx_library(iutest_main "${cxx_strict}" ${IUTEST_ROOT_DIR}/src/iutest_main.cpp)

########################################################################
#
# サンプル
#
cxx_executable_sample(iutest_sample
 ${IUTEST_ROOT_DIR}/samples/main.cpp
 ${IUTEST_ROOT_DIR}/samples/assertion.cpp
 ${IUTEST_ROOT_DIR}/samples/disabledtest.cpp
 ${IUTEST_ROOT_DIR}/samples/exception.cpp
 ${IUTEST_ROOT_DIR}/samples/fixture.cpp
 ${IUTEST_ROOT_DIR}/samples/japanese.cpp
 ${IUTEST_ROOT_DIR}/samples/matcher.cpp
 ${IUTEST_ROOT_DIR}/samples/parameterized.cpp
 ${IUTEST_ROOT_DIR}/samples/printto.cpp
 ${IUTEST_ROOT_DIR}/samples/simple.cpp
 ${IUTEST_ROOT_DIR}/samples/typed.cpp
)

########################################################################
#
# gtest サンプル
#
if (build_gtest_samples)
  cxx_executable_gtest_sample(sample1_unittest  ${IUTEST_ROOT_DIR}/samples/gtest sample1.cc main.cc)
  cxx_executable_gtest_sample(sample2_unittest  ${IUTEST_ROOT_DIR}/samples/gtest sample2.cc main.cc)
  cxx_executable_gtest_sample(sample3_unittest  ${IUTEST_ROOT_DIR}/samples/gtest main.cc)
  cxx_executable_gtest_sample(sample4_unittest  ${IUTEST_ROOT_DIR}/samples/gtest sample4.cc main.cc)
  cxx_executable_gtest_sample(sample5_unittest  ${IUTEST_ROOT_DIR}/samples/gtest sample1.cc main.cc)
  cxx_executable_gtest_sample(sample6_unittest  ${IUTEST_ROOT_DIR}/samples/gtest main.cc)
  cxx_executable_gtest_sample(sample7_unittest  ${IUTEST_ROOT_DIR}/samples/gtest main.cc)
  cxx_executable_gtest_sample(sample8_unittest  ${IUTEST_ROOT_DIR}/samples/gtest main.cc)
  cxx_executable_gtest_sample(sample9_unittest  ${IUTEST_ROOT_DIR}/samples/gtest )
  cxx_executable_gtest_sample(sample10_unittest ${IUTEST_ROOT_DIR}/samples/gtest )
endif()

########################################################################
#
# test
#
if (build_tests)
  cxx_executable_test_with_main(all_tests
   assertion_tests.cpp
   basic_tests.cpp
   combine_tests.cpp
   compatibility_tests.cpp
   filepath_tests.cpp
   fixture_tests.cpp
   floatingpoint_tests.cpp
   no_failure_tests.cpp
   nullptr_tests.cpp
   param_test_tests1.cpp
   param_test_tests2.cpp
   pred_tests.cpp
   prod_tests1.cpp
   prod_tests2.cpp
   spi_tests.cpp
   static_assertion_tests.cpp
   string_assertion_tests.cpp
   syntax_tests.cpp
   syntax_gtest_tests.cpp
   type_param_tests1.cpp
   type_param_tests2.cpp
   type_param_tests3.cpp
   typed_test_tests.cpp
   values_tests.cpp
  )
  cxx_executable_test(assertion_return_tests)
  cxx_executable_test(assume_tests)
  cxx_executable_test(break_on_failure_nobreak_tests)
  cxx_executable_test(catch_exceptions_tests)
  cxx_executable_test(commandline_tests)
  cxx_executable_test(csvparams_tests)
  cxx_executable_test(disabled_tests)
  cxx_executable_test(env_var_gtest_tests)
  cxx_executable_test(environment_tests)
  cxx_executable_test(exception_assertion_tests)
  cxx_executable_test(exception_tests)
  cxx_executable_test(expression_assertion_tests)
  cxx_executable_test_with_main(extension_tests
    concat_tests.cpp
    fixture_alias_tests.cpp
    ignore_tests.cpp
    package_tests1.cpp
    package_tests2.cpp
    pairwise_tests.cpp
    param_method_tests.cpp
    param_test_with_any_tests.cpp
    pp_tests.cpp
    random_values_tests.cpp
{'fraction_non_alphanumeric': 0.17311357775535374, 'fraction_numerical': 0.006054490413723511, 'mean_word_length': 6.852112676056338, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4985461', 'n_tokens_mistral': 3247, 'n_tokens_neox': 3228, 'n_words': 334}