<commit_before>cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(openmc C CXX)

# Set version numbers
set(OPENMC_VERSION_MAJOR 0)
set(OPENMC_VERSION_MINOR 12)
set(OPENMC_VERSION_RELEASE 1)
set(OPENMC_VERSION ${OPENMC_VERSION_MAJOR}.${OPENMC_VERSION_MINOR}.${OPENMC_VERSION_RELEASE})
configure_file(include/openmc/version.h.in "${CMAKE_BINARY_DIR}/include/openmc/version.h" @ONLY)

# Setup output directories
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

# Set module path
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)

# Allow user to specify <project>_ROOT variables
if (NOT (CMAKE_VERSION VERSION_LESS 3.12))
  cmake_policy(SET CMP0074 NEW)
endif()

#===============================================================================
# Command line options
#===============================================================================

option(openmp   "Enable shared-memory parallelism with OpenMP"   ON)
option(profile  "Compile with profiling flags"                   OFF)
option(debug    "Compile with debug flags"                       OFF)
option(optimize "Turn on all compiler optimization flags"        OFF)
option(coverage "Compile with coverage analysis flags"           OFF)
option(dagmc    "Enable support for DAGMC (CAD) geometry"        OFF)

#===============================================================================
# MPI for distributed-memory parallelism
#===============================================================================

set(MPI_ENABLED FALSE)
if(${CMAKE_CXX_COMPILER} MATCHES "(mpi[^/]*|CC)$")
  message(STATUS "Detected MPI wrapper: ${CMAKE_CXX_COMPILER}")
  set(MPI_ENABLED TRUE)
endif()

#===============================================================================
# DAGMC Geometry Support - need DAGMC/MOAB
#===============================================================================
if(dagmc)
  find_package(DAGMC REQUIRED PATH_SUFFIXES lib/cmake)
endif()

#===============================================================================
# Check for submodules perhaps already on system
#===============================================================================

# If not found, we just pull appropriate versions from github and build them.
find_package(fmt QUIET)
if(fmt_FOUND)
  message(STATUS "Found fmt: ${fmt_DIR} (version ${fmt_VERSION})")
else()
  message(STATUS "Did not find fmt, will use submodule instead")
endif()
find_package(pugixml QUIET)
if(pugixml_FOUND)
  message(STATUS "Found pugixml: ${pugixml_DIR}")
else()
  message(STATUS "Did not find pugixml, will use submodule instead")<commit_msg>Prevent pugixml and fmt from being found via PATH<commit_after>cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(openmc C CXX)

# Set version numbers
set(OPENMC_VERSION_MAJOR 0)
set(OPENMC_VERSION_MINOR 12)
set(OPENMC_VERSION_RELEASE 1)
set(OPENMC_VERSION ${OPENMC_VERSION_MAJOR}.${OPENMC_VERSION_MINOR}.${OPENMC_VERSION_RELEASE})
configure_file(include/openmc/version.h.in "${CMAKE_BINARY_DIR}/include/openmc/version.h" @ONLY)

# Setup output directories
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

# Set module path
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)

# Allow user to specify <project>_ROOT variables
if (NOT (CMAKE_VERSION VERSION_LESS 3.12))
  cmake_policy(SET CMP0074 NEW)
endif()

#===============================================================================
# Command line options
#===============================================================================

option(openmp   "Enable shared-memory parallelism with OpenMP"   ON)
option(profile  "Compile with profiling flags"                   OFF)
option(debug    "Compile with debug flags"                       OFF)
option(optimize "Turn on all compiler optimization flags"        OFF)
option(coverage "Compile with coverage analysis flags"           OFF)
option(dagmc    "Enable support for DAGMC (CAD) geometry"        OFF)

#===============================================================================
# MPI for distributed-memory parallelism
#===============================================================================

set(MPI_ENABLED FALSE)
if(${CMAKE_CXX_COMPILER} MATCHES "(mpi[^/]*|CC)$")
  message(STATUS "Detected MPI wrapper: ${CMAKE_CXX_COMPILER}")
  set(MPI_ENABLED TRUE)
endif()

#===============================================================================
# DAGMC Geometry Support - need DAGMC/MOAB
#===============================================================================
if(dagmc)
  find_package(DAGMC REQUIRED PATH_SUFFIXES lib/cmake)
endif()

#===============================================================================
# Check for submodules perhaps already on system
#===============================================================================

# If not found, we just pull appropriate versions from github and build them.
find_package(fmt QUIET NO_SYSTEM_ENVIRONMENT_PATH)
if(fmt_FOUND)
  message(STATUS "Found fmt: ${fmt_DIR} (version ${fmt_VERSION})")
else()
  message(STATUS "Did not find fmt, will use submodule instead")
endif()
find_package(pugixml QUIET NO_SYSTEM_ENVIRONMENT_PATH)
if(pugixml_FOUND)
  message(STATUS "Found pugixml: ${pugixml_DIR}")
else()
  message(STATUS "Did not find pugixml, will use submodule instead")
{'fraction_non_alphanumeric': 0.30342342342342343, 'fraction_numerical': 0.0046846846846846845, 'mean_word_length': 7.474809160305344, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 11}, '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': '4688097', 'n_tokens_mistral': 1638, 'n_tokens_neox': 1500, 'n_words': 367}